import React from 'react';
import { useState } from 'react';
import { Tabs } from 'antd';
import AccountDetails from './components/accountDetails'
import CorporateInfo from './components/corporateInfo'

const Index = () => {
  const [tabkey, setTabKey] = useState(1)
  const items = [
    {
      key: 1,
      label: '账号详情',
      children: <AccountDetails />,
    },
    {
      key: 2,
      label: '公司信息',
      children: <CorporateInfo />,
    },
  ];

  const handleTabChange = (key) => {
    setTabKey(key)
  }

  return (
    <Tabs
      items={items}
      activeKey={tabkey}
      onChange={handleTabChange}
    />
  )
};
export default Index;
